/*
 Navicat Premium Data Transfer

 Source Server         : zb_dev
 Source Server Type    : MySQL
 Source Server Version : 50564
 Source Host           : 132.232.209.145:3306
 Source Schema         : zb_mall

 Target Server Type    : MySQL
 Target Server Version : 50564
 File Encoding         : 65001

 Date: 17/06/2020 11:12:42
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for spot_banner
-- ----------------------------
DROP TABLE IF EXISTS `spot_banner`;
CREATE TABLE `spot_banner` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `banner_type` int(11) DEFAULT NULL,
  `link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sort_num` int(11) DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of spot_banner
-- ----------------------------
BEGIN;
INSERT INTO `spot_banner` VALUES (1, '2020-06-17 00:15:48', NULL, '2020-06-17 00:15:48', 4, '', 0, 'yaoqing', 'http://spot-mall-dev.oss-cn-shenzhen.aliyuncs.com/image/17d7d34287d14a0abdae6ae0802d1d3d.png');
INSERT INTO `spot_banner` VALUES (2, '2020-06-17 00:16:05', NULL, '2020-06-17 00:16:05', 3, '', 0, 'kaidian ', 'http://spot-mall-dev.oss-cn-shenzhen.aliyuncs.com/image/65b6f829d6b84e229594566f0728ccf0.png');
COMMIT;

-- ----------------------------
-- Table structure for sys_manager
-- ----------------------------
DROP TABLE IF EXISTS `sys_manager`;
CREATE TABLE `sys_manager` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `enable` bit(1) DEFAULT NULL,
  `last_login_time` datetime DEFAULT NULL,
  `login_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `login_pwd` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_user_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `FKr9mgs1pdi016h61xi6q331kc4` (`role_id`),
  CONSTRAINT `FKr9mgs1pdi016h61xi6q331kc4` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_manager
-- ----------------------------
BEGIN;
INSERT INTO `sys_manager` VALUES (1, '2020-06-16 23:04:06', NULL, '2020-06-16 23:04:06', b'1', '2020-06-16 23:04:05', 'admin', '$2a$10$DMshJq1svwh.0sQPL12O..kVv4nS02L0g9e7zo.cTxC5mhtzNEtSK', 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_menus`;
CREATE TABLE `sys_menus` (
  `item_code` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `item_child_count` bigint(20) DEFAULT NULL,
  `item_depth` int(11) DEFAULT NULL,
  `item_enable` bit(1) DEFAULT NULL,
  `item_function` bit(1) DEFAULT NULL,
  `item_icon_cls` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_parent_code` int(11) DEFAULT NULL,
  `item_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`item_code`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_menus
-- ----------------------------
BEGIN;
INSERT INTO `sys_menus` VALUES (1, '2020-06-16 23:04:06', NULL, '2020-06-16 23:04:13', 6, NULL, b'1', b'0', 'cogs', '系统配置', 0, 'none', NULL, 50);
INSERT INTO `sys_menus` VALUES (2, '2020-06-16 23:04:06', NULL, '2020-06-16 23:04:08', 5, NULL, b'1', b'0', 'bars', '菜单管理', 1, '/sys/menus', NULL, 2);
INSERT INTO `sys_menus` VALUES (3, '2020-06-16 23:04:07', NULL, '2020-06-16 23:04:07', 0, NULL, b'1', b'1', '', '添加和编辑', 2, '/sys/ajax/save', NULL, 1);
INSERT INTO `sys_menus` VALUES (4, '2020-06-16 23:04:07', NULL, '2020-06-16 23:04:07', 0, NULL, b'1', b'1', '', '详情', 2, '/sys/ajax/details', NULL, 1);
INSERT INTO `sys_menus` VALUES (5, '2020-06-16 23:04:07', NULL, '2020-06-16 23:04:07', 0, NULL, b'1', b'1', '', '列表', 2, '/sys/ajax/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (6, '2020-06-16 23:04:08', NULL, '2020-06-16 23:04:08', 0, NULL, b'1', b'1', '', '删除', 2, '/sys/ajax/delete', NULL, 1);
INSERT INTO `sys_menus` VALUES (7, '2020-06-16 23:04:08', NULL, '2020-06-16 23:04:08', 0, NULL, b'1', b'1', '', '设置状态', 2, '/sys/ajax/activate', NULL, 1);
INSERT INTO `sys_menus` VALUES (8, '2020-06-16 23:04:08', NULL, '2020-06-16 23:04:11', 6, NULL, b'1', b'0', 'user', '角色管理', 1, '/sys/roles', NULL, 3);
INSERT INTO `sys_menus` VALUES (9, '2020-06-16 23:04:09', NULL, '2020-06-16 23:04:09', 0, NULL, b'1', b'1', '', '列表', 8, '/sys/ajax/rolelist', NULL, 1);
INSERT INTO `sys_menus` VALUES (10, '2020-06-16 23:04:09', NULL, '2020-06-16 23:04:09', 0, NULL, b'1', b'1', '', '权限列表', 8, '/sys/ajax/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (11, '2020-06-16 23:04:09', NULL, '2020-06-16 23:04:09', 0, NULL, b'1', b'1', '', '设置状态', 8, '/sys/ajax/setenable', NULL, 1);
INSERT INTO `sys_menus` VALUES (12, '2020-06-16 23:04:10', NULL, '2020-06-16 23:04:10', 0, NULL, b'1', b'1', '', '删除', 8, '/sys/ajax/deleterole', NULL, 1);
INSERT INTO `sys_menus` VALUES (13, '2020-06-16 23:04:10', NULL, '2020-06-16 23:04:10', 0, NULL, b'1', b'1', '', '设置权限', 8, '/sys/ajax/setpower', NULL, 1);
INSERT INTO `sys_menus` VALUES (14, '2020-06-16 23:04:10', NULL, '2020-06-16 23:04:10', 0, NULL, b'1', b'1', '', '添加和编辑', 8, '/sys/ajax/editrole', NULL, 1);
INSERT INTO `sys_menus` VALUES (15, '2020-06-16 23:04:11', NULL, '2020-06-16 23:04:12', 3, NULL, b'1', b'0', 'users', '账户管理', 1, '/sys/manager', NULL, 4);
INSERT INTO `sys_menus` VALUES (16, '2020-06-16 23:04:11', NULL, '2020-06-16 23:04:11', 0, NULL, b'1', b'1', '', '添加和编辑', 15, '/sys/ajax/editmanager', NULL, 1);
INSERT INTO `sys_menus` VALUES (17, '2020-06-16 23:04:11', NULL, '2020-06-16 23:04:11', 0, NULL, b'1', b'1', '', '列表', 15, '/sys/ajax/managerlist', NULL, 1);
INSERT INTO `sys_menus` VALUES (18, '2020-06-16 23:04:12', NULL, '2020-06-16 23:04:12', 0, NULL, b'1', b'1', '', '设置状态', 15, '/sys/ajax/setuserenable', NULL, 1);
INSERT INTO `sys_menus` VALUES (19, '2020-06-16 23:04:12', NULL, '2020-06-16 23:04:13', 1, NULL, b'1', b'0', 'list', '全局配置', 1, '/config/getConfig', NULL, 0);
INSERT INTO `sys_menus` VALUES (20, '2020-06-16 23:04:12', NULL, '2020-06-16 23:04:12', 0, NULL, b'1', b'1', '', '编辑', 19, '/config/ajax/save', NULL, 1);
INSERT INTO `sys_menus` VALUES (21, '2020-06-16 23:04:13', NULL, '2020-06-16 23:04:13', 0, NULL, b'1', b'0', 'list', '广告列表', 1, '/banner/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (22, '2020-06-16 23:04:13', NULL, '2020-06-16 23:04:13', 0, NULL, b'0', b'0', 'edit', '添加广告', 1, '/banner/edit', NULL, 1);
INSERT INTO `sys_menus` VALUES (23, '2020-06-16 23:04:13', NULL, '2020-06-16 23:04:14', 3, NULL, b'1', b'0', 'file-text-o', '产品管理', 0, 'none', NULL, 49);
INSERT INTO `sys_menus` VALUES (24, '2020-06-16 23:04:14', NULL, '2020-06-16 23:04:14', 0, NULL, b'1', b'0', 'list', '店铺商品列表', 23, '/product/normalList', NULL, 1);
INSERT INTO `sys_menus` VALUES (25, '2020-06-16 23:04:14', NULL, '2020-06-16 23:04:14', 0, NULL, b'1', b'0', 'list', '直播商品列表', 23, '/product/liveList', NULL, 2);
INSERT INTO `sys_menus` VALUES (26, '2020-06-16 23:04:14', NULL, '2020-06-16 23:04:14', 0, NULL, b'1', b'0', 'pencil-square-o', '类目管理', 23, '/category/list', NULL, 3);
INSERT INTO `sys_menus` VALUES (27, '2020-06-16 23:04:15', NULL, '2020-06-16 23:04:15', 2, NULL, b'1', b'0', 'users', '用户管理', 0, 'none', NULL, 48);
INSERT INTO `sys_menus` VALUES (28, '2020-06-16 23:04:15', NULL, '2020-06-16 23:04:15', 0, NULL, b'1', b'0', 'list', '粉丝列表', 27, '/user/list?type=0', NULL, 3);
INSERT INTO `sys_menus` VALUES (29, '2020-06-16 23:04:15', NULL, '2020-06-16 23:04:15', 0, NULL, b'1', b'0', 'list', '会员列表', 27, '/user/list?type=1', NULL, 3);
INSERT INTO `sys_menus` VALUES (30, '2020-06-16 23:04:15', NULL, '2020-06-16 23:04:15', 0, NULL, b'1', b'0', 'users', '直播管理', 0, '/live/list', NULL, 47);
INSERT INTO `sys_menus` VALUES (31, '2020-06-16 23:04:16', NULL, '2020-06-16 23:04:17', 4, NULL, b'1', b'0', 'list', '订单管理', 0, 'none', NULL, 47);
INSERT INTO `sys_menus` VALUES (32, '2020-06-16 23:04:16', NULL, '2020-06-16 23:04:16', 0, NULL, b'1', b'0', 'list', '销售订单', 31, '/order/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (33, '2020-06-16 23:04:16', NULL, '2020-06-16 23:04:16', 0, NULL, b'1', b'0', 'list', '业务订单', 31, '/order/biz/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (34, '2020-06-16 23:04:16', NULL, '2020-06-16 23:04:16', 0, NULL, b'1', b'0', 'list', '售后申请', 31, '/order/afterSale/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (35, '2020-06-16 23:04:17', NULL, '2020-06-16 23:04:17', 0, NULL, b'1', b'0', 'list', '发货单', 31, '/order/deliver/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (36, '2020-06-16 23:04:17', NULL, '2020-06-16 23:04:17', 1, NULL, b'1', b'0', 'folder', '商户管理', 0, 'none', NULL, 48);
INSERT INTO `sys_menus` VALUES (37, '2020-06-16 23:04:17', NULL, '2020-06-16 23:04:17', 0, NULL, b'1', b'0', 'list', '商户列表', 36, '/merchant/list', NULL, 1);
INSERT INTO `sys_menus` VALUES (38, '2020-06-16 23:04:18', NULL, '2020-06-16 23:04:18', 0, NULL, b'1', b'0', 'desktop', '桌面', 0, '/desktop', NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `role_id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `authority` text COLLATE utf8mb4_unicode_ci,
  `enable` bit(1) DEFAULT NULL,
  `role_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role_type` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '2020-06-16 23:04:05', NULL, '2020-06-16 23:04:05', '', b'1', '超级管理员', -1, -1);
COMMIT;

-- ----------------------------
-- Table structure for zb_advance_log
-- ----------------------------
DROP TABLE IF EXISTS `zb_advance_log`;
CREATE TABLE `zb_advance_log` (
  `log_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `after_amount` decimal(12,2) DEFAULT NULL,
  `amount` decimal(12,2) DEFAULT NULL,
  `before_amount` decimal(12,2) DEFAULT NULL,
  `data_type` int(11) DEFAULT NULL,
  `log_type` int(11) DEFAULT NULL,
  `op_id` int(11) DEFAULT NULL,
  `op_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `recharge_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_after_sale_bill
-- ----------------------------
DROP TABLE IF EXISTS `zb_after_sale_bill`;
CREATE TABLE `zb_after_sale_bill` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `after_sale_status` int(11) DEFAULT NULL,
  `after_sale_type` int(11) DEFAULT NULL,
  `father_rebate` decimal(19,2) DEFAULT NULL,
  `final_amount` decimal(9,2) DEFAULT NULL,
  `cate_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable7days_returned_purchase` bit(1) DEFAULT NULL,
  `enable_nationwide_posting_free` bit(1) DEFAULT NULL,
  `goods_bn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `goods_id` bigint(20) DEFAULT NULL,
  `goods_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  `rebate_rate_one` decimal(6,3) DEFAULT NULL,
  `rebate_rate_two` decimal(6,3) DEFAULT NULL,
  `room_id` bigint(20) DEFAULT NULL,
  `service_rate` decimal(6,3) DEFAULT NULL,
  `thumbnail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `grand_rebate` decimal(19,2) DEFAULT NULL,
  `images` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `payment` decimal(19,2) DEFAULT NULL,
  `reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refund_balance` decimal(9,2) DEFAULT NULL,
  `refund_bill_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refund_type` int(11) DEFAULT NULL,
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_order_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` decimal(9,2) DEFAULT NULL,
  `user_memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wechat_refund_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rel_merchant_id` bigint(20) DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKaoy0cwi16ts69y8ib7lt4b048` (`rel_merchant_id`),
  KEY `FK93gj1ss9mabve6kiiurg58adj` (`rel_user_id`),
  CONSTRAINT `FK93gj1ss9mabve6kiiurg58adj` FOREIGN KEY (`rel_user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKaoy0cwi16ts69y8ib7lt4b048` FOREIGN KEY (`rel_merchant_id`) REFERENCES `zb_merchant` (`merchant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_bank
-- ----------------------------
DROP TABLE IF EXISTS `zb_bank`;
CREATE TABLE `zb_bank` (
  `bank_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `bank_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_pic` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`bank_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_base_config
-- ----------------------------
DROP TABLE IF EXISTS `zb_base_config`;
CREATE TABLE `zb_base_config` (
  `config_id` int(11) NOT NULL AUTO_INCREMENT,
  `basics_config` longtext COLLATE utf8mb4_unicode_ci,
  `withdraw_config` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`config_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_base_config
-- ----------------------------
BEGIN;
INSERT INTO `zb_base_config` VALUES (1, 'null', NULL);
COMMIT;

-- ----------------------------
-- Table structure for zb_biz_order
-- ----------------------------
DROP TABLE IF EXISTS `zb_biz_order`;
CREATE TABLE `zb_biz_order` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `final_amount` decimal(9,2) DEFAULT NULL,
  `pay_expire_time` datetime DEFAULT NULL,
  `pay_status` int(11) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `payment_bill_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `surplus_amount` decimal(9,2) DEFAULT NULL,
  `deal_type` int(11) DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKpcx3h1tfalersma9wcxthw0tk` (`rel_user_id`),
  CONSTRAINT `FKpcx3h1tfalersma9wcxthw0tk` FOREIGN KEY (`rel_user_id`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_category
-- ----------------------------
DROP TABLE IF EXISTS `zb_category`;
CREATE TABLE `zb_category` (
  `cat_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `cat_name` varchar(100) DEFAULT NULL,
  `commission_rate` decimal(6,3) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `depth` int(11) DEFAULT NULL,
  `parent_cat_id` int(11) DEFAULT NULL,
  `rebate_rate_one` decimal(6,3) DEFAULT NULL,
  `rebate_rate_two` decimal(6,3) DEFAULT NULL,
  `remark` varchar(400) DEFAULT NULL,
  `sort_no` int(11) DEFAULT NULL,
  `tree_path` varchar(500) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `cat_pic` varchar(300) DEFAULT NULL,
  `recommend_flag` int(11) DEFAULT NULL,
  `status_code` int(11) DEFAULT NULL,
  PRIMARY KEY (`cat_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of zb_category
-- ----------------------------
BEGIN;
INSERT INTO `zb_category` VALUES (22, '玉翠珠宝', 10.000, '2020-06-14 11:14:16', 1, 0, 5.000, 2.000, '', 50, '|22|', '2020-06-14 11:23:55', '', 0, 1);
INSERT INTO `zb_category` VALUES (23, '翡翠', NULL, '2020-06-14 11:14:33', 2, 22, NULL, NULL, '', 50, '|22|23|', '2020-06-14 11:22:06', '', 1, 1);
INSERT INTO `zb_category` VALUES (24, '和田玉', NULL, '2020-06-14 11:14:44', 2, 22, NULL, NULL, '', 50, '|22|24|', '2020-06-14 11:23:06', '', 1, 1);
INSERT INTO `zb_category` VALUES (25, '南红', NULL, '2020-06-14 11:14:51', 2, 22, NULL, NULL, '', 50, '|22|25|', '2020-06-14 11:23:11', '', 1, 1);
INSERT INTO `zb_category` VALUES (26, '珍珠', NULL, '2020-06-14 11:14:58', 2, 22, NULL, NULL, '', 50, '|22|26|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (27, '琥珀蜜蜡', NULL, '2020-06-14 11:15:05', 2, 22, NULL, NULL, '', 50, '|22|27|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (28, '绿松石', NULL, '2020-06-14 11:15:12', 2, 22, NULL, NULL, '', 50, '|22|28|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (29, '金银钻石', NULL, '2020-06-14 11:15:18', 2, 22, NULL, NULL, '', 50, '|22|29|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (30, '鸡血玉', NULL, '2020-06-14 11:15:29', 2, 22, NULL, NULL, '', 50, '|22|30|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (31, '贵重宝石', NULL, '2020-06-14 11:15:40', 2, 22, NULL, NULL, '', 50, '|22|31|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (32, '黄龙玉', NULL, '2020-06-14 11:15:47', 2, 22, NULL, NULL, '', 50, '|22|32|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (33, '原石', NULL, '2020-06-14 11:15:56', 2, 22, NULL, NULL, '', 50, '|22|33|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (34, '鸡血石', NULL, '2020-06-14 11:16:03', 2, 22, NULL, NULL, '', 50, '|22|34|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (35, '玛瑙', NULL, '2020-06-14 11:16:10', 2, 22, NULL, NULL, '', 50, '|22|35|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (36, '其它', NULL, '2020-06-14 11:16:17', 2, 22, NULL, NULL, '', 50, '|22|36|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (37, '文玩杂项', 10.000, '2020-06-14 11:16:34', 1, 0, 0.000, 0.000, '', 50, '|37|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (38, '钱币邮票', NULL, '2020-06-14 11:16:45', 2, 37, NULL, NULL, '', 50, '|37|38|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (39, '化石陨石', NULL, '2020-06-14 11:16:53', 2, 37, NULL, NULL, '', 50, '|37|39|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (40, '艺术文化', NULL, '2020-06-14 11:17:01', 2, 37, NULL, NULL, '', 50, '|37|40|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (41, '烟具', NULL, '2020-06-14 11:17:09', 2, 37, NULL, NULL, '', 50, '|37|41|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (42, '图书', NULL, '2020-06-14 11:17:17', 2, 37, NULL, NULL, '', 50, '|37|42|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (43, '树化石', NULL, '2020-06-14 11:17:30', 2, 37, NULL, NULL, '', 50, '|37|43|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (44, '书画篆刻', 15.000, '2020-06-14 11:17:45', 1, 0, 0.000, 0.000, '', 50, '|44|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (45, '书法篆刻', NULL, '2020-06-14 11:18:01', 2, 44, NULL, NULL, '', 50, '|44|45|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (46, '篆刻|拓片', NULL, '2020-06-14 11:18:10', 2, 44, NULL, NULL, '', 50, '|44|46|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (47, '油画', NULL, '2020-06-14 11:18:21', 2, 44, NULL, NULL, '', 50, '|44|47|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (48, '版画|装饰画', NULL, '2020-06-14 11:18:31', 2, 44, NULL, NULL, '', 50, '|44|48|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (49, '印石章料', NULL, '2020-06-14 11:18:40', 2, 44, NULL, NULL, '', 50, '|44|49|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (50, '国画', NULL, '2020-06-14 11:18:49', 2, 44, NULL, NULL, '', 50, '|44|50|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (51, '挂坠', NULL, '2020-06-14 11:19:02', 3, 23, NULL, NULL, '', 50, '|22|23|51|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (52, '手镯', NULL, '2020-06-14 11:19:10', 3, 23, NULL, NULL, '', 50, '|22|23|52|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (53, '戒指', NULL, '2020-06-14 11:19:18', 3, 23, NULL, NULL, '', 50, '|22|23|53|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (54, '耳环', NULL, '2020-06-14 11:19:26', 3, 23, NULL, NULL, '', 50, '|22|23|54|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (55, '手串', NULL, '2020-06-14 11:19:33', 3, 23, NULL, NULL, '', 50, '|22|23|55|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (56, '把件', NULL, '2020-06-14 11:19:43', 3, 23, NULL, NULL, '', 50, '|22|23|56|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (57, '摆件', NULL, '2020-06-14 11:19:51', 3, 23, NULL, NULL, '', 50, '|22|23|57|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (58, '翡翠原石', NULL, '2020-06-14 11:20:00', 3, 23, NULL, NULL, '', 50, '|22|23|58|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (59, '蛋面', NULL, '2020-06-14 11:20:07', 3, 23, NULL, NULL, '', 50, '|22|23|59|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (60, '其他', NULL, '2020-06-14 11:20:13', 3, 23, NULL, NULL, '', 50, '|22|23|60|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (61, '挂坠', NULL, '2020-06-14 11:20:36', 3, 24, NULL, NULL, '', 50, '|22|24|61|', NULL, '', 0, 1);
INSERT INTO `zb_category` VALUES (62, '手镯', NULL, '2020-06-14 11:20:46', 3, 24, NULL, NULL, '', 50, '|22|24|62|', NULL, '', 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for zb_deliver_bill
-- ----------------------------
DROP TABLE IF EXISTS `zb_deliver_bill`;
CREATE TABLE `zb_deliver_bill` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `deliver_type` int(11) DEFAULT NULL,
  `express_com` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `express_com_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `express_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `freight_amount` decimal(19,2) DEFAULT NULL,
  `from_role` int(11) DEFAULT NULL,
  `is_received` bit(1) DEFAULT NULL,
  `received_time` datetime DEFAULT NULL,
  `city_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `national_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver_mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_order_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_role` int(11) DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK78qeq3vo1fnt3d0oeyx6kgkwm` (`merchant_id`),
  CONSTRAINT `FK78qeq3vo1fnt3d0oeyx6kgkwm` FOREIGN KEY (`merchant_id`) REFERENCES `zb_merchant` (`merchant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_deliver_item
-- ----------------------------
DROP TABLE IF EXISTS `zb_deliver_item`;
CREATE TABLE `zb_deliver_item` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `cate_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable7days_returned_purchase` bit(1) DEFAULT NULL,
  `enable_nationwide_posting_free` bit(1) DEFAULT NULL,
  `goods_bn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `goods_id` bigint(20) DEFAULT NULL,
  `goods_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  `rebate_rate_one` decimal(6,3) DEFAULT NULL,
  `rebate_rate_two` decimal(6,3) DEFAULT NULL,
  `room_id` bigint(20) DEFAULT NULL,
  `service_rate` decimal(6,3) DEFAULT NULL,
  `thumbnail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `num` int(11) DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  `deliver_bill_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKik93joshn06wnta4x9y2uv5mv` (`deliver_bill_id`),
  CONSTRAINT `FKik93joshn06wnta4x9y2uv5mv` FOREIGN KEY (`deliver_bill_id`) REFERENCES `zb_deliver_bill` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_identify_order
-- ----------------------------
DROP TABLE IF EXISTS `zb_identify_order`;
CREATE TABLE `zb_identify_order` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `deliver_status` int(11) DEFAULT NULL,
  `identify_org_id` int(11) DEFAULT NULL,
  `identify_status` int(11) DEFAULT NULL,
  `identify_time` datetime DEFAULT NULL,
  `order_item_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKewwpn6gl40ah3jstgh2i51mk2` (`order_item_id`),
  CONSTRAINT `FKewwpn6gl40ah3jstgh2i51mk2` FOREIGN KEY (`order_item_id`) REFERENCES `zb_order_item` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_live_director
-- ----------------------------
DROP TABLE IF EXISTS `zb_live_director`;
CREATE TABLE `zb_live_director` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `director_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_owner` bit(1) DEFAULT NULL,
  `live_room_id` bigint(20) DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKd120s9u6b6385jdet6mpt2g9r` (`live_room_id`),
  KEY `FK1dich6uxkbklu99hhb5y66xjt` (`rel_user_id`),
  CONSTRAINT `FK1dich6uxkbklu99hhb5y66xjt` FOREIGN KEY (`rel_user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKd120s9u6b6385jdet6mpt2g9r` FOREIGN KEY (`live_room_id`) REFERENCES `zb_live_room` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_live_director
-- ----------------------------
BEGIN;
INSERT INTO `zb_live_director` VALUES (1, '2020-06-17 00:02:03', NULL, b'0', '2020-06-17 00:06:06', '小剑😂', b'1', 1, 1);
INSERT INTO `zb_live_director` VALUES (2, '2020-06-17 01:27:30', NULL, b'0', '2020-06-17 01:27:30', '小剑', b'1', 2, 1);
COMMIT;

-- ----------------------------
-- Table structure for zb_live_room
-- ----------------------------
DROP TABLE IF EXISTS `zb_live_room`;
CREATE TABLE `zb_live_room` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `audit` int(11) DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `landscape_cover` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `live_addr` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `logo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `portrait_cover` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_enabled` bit(1) DEFAULT NULL,
  `open_time` datetime DEFAULT NULL,
  `order_weight` int(11) DEFAULT NULL,
  `approval_message` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reward_rate` decimal(6,3) DEFAULT NULL,
  `time_herald` datetime DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK4t886erw7grbbe9010wk3qcgi` (`merchant_id`),
  CONSTRAINT `FK4t886erw7grbbe9010wk3qcgi` FOREIGN KEY (`merchant_id`) REFERENCES `zb_merchant` (`merchant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_live_room
-- ----------------------------
BEGIN;
INSERT INTO `zb_live_room` VALUES (1, '2020-06-17 00:01:36', NULL, b'0', '2020-06-17 00:06:40', 1, '卖剑🗡±', '/image/005da95eccdc49d98edce28c5bccb41a.jpg', 'hz', '/image/ff667e50dc154db386d45e9887051863.jpeg', '/image/701e777377ab4cfb9acfcac6cf8b2961.jpg', '三少爷直播间', b'1', '2020-06-17 00:02:03', 0, NULL, 0.150, NULL, 2);
INSERT INTO `zb_live_room` VALUES (2, '2020-06-17 01:17:28', NULL, b'0', '2020-06-17 01:27:30', 1, '卖剑圣诞生了', '/image/125f551749754429930c0885daca6276.jpg', NULL, '/image/dae1b01d71f6423283fc4da0d0bbb5db.jpg', '/image/1c18ebc7debc4817ae9d15af03c55e6a.jpg', '小剑直播间', b'1', '2020-06-17 01:27:30', 0, NULL, 0.150, NULL, 3);
COMMIT;

-- ----------------------------
-- Table structure for zb_live_room_fan
-- ----------------------------
DROP TABLE IF EXISTS `zb_live_room_fan`;
CREATE TABLE `zb_live_room_fan` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `room_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKjk9xv75rrhyq7fvjobqcffddd` (`room_id`),
  KEY `FK7i9yi67hw4urpynnu79jjhdhw` (`user_id`),
  CONSTRAINT `FK7i9yi67hw4urpynnu79jjhdhw` FOREIGN KEY (`user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKjk9xv75rrhyq7fvjobqcffddd` FOREIGN KEY (`room_id`) REFERENCES `zb_live_room` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_live_session
-- ----------------------------
DROP TABLE IF EXISTS `zb_live_session`;
CREATE TABLE `zb_live_session` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `current_max_visits` bigint(20) DEFAULT NULL,
  `deal_amount` decimal(19,2) DEFAULT NULL,
  `deal_num` bigint(20) DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `foreshow_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `foreshow_time` datetime DEFAULT NULL,
  `max_online_num` bigint(20) DEFAULT NULL,
  `play_status` int(11) DEFAULT NULL,
  `play_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `session_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `director_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKimkcwblh7q3uewmkbvckwdhej` (`director_id`),
  CONSTRAINT `FKimkcwblh7q3uewmkbvckwdhej` FOREIGN KEY (`director_id`) REFERENCES `zb_live_director` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_live_session
-- ----------------------------
BEGIN;
INSERT INTO `zb_live_session` VALUES ('20200617000911338386', '2020-06-17 00:09:12', NULL, b'0', '2020-06-17 01:48:26', 0, 0.00, 0, NULL, '三少爷的剑，快来买呀\n三少爷的剑，快来买呀', '2020-06-19 11:05:46', 0, 0, NULL, '三少爷的剑，快来买呀', NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for zb_merchant
-- ----------------------------
DROP TABLE IF EXISTS `zb_merchant`;
CREATE TABLE `zb_merchant` (
  `merchant_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `audit_status` int(11) DEFAULT NULL,
  `balance` decimal(19,2) DEFAULT NULL,
  `balance_in_future` decimal(19,2) DEFAULT NULL,
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `background_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_way` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `national_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver_mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wechat_account` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `earnest_money` decimal(19,2) DEFAULT NULL,
  `follows` bigint(20) DEFAULT NULL,
  `history_total_amount` decimal(19,2) DEFAULT NULL,
  `certificate_of_intangible_cultural` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_legal_person_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_legal_person_id_emblem` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_legal_person_id_face` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_legal_person_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_license_copy` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enterprise_trademark_license` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entity_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `person_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `person_id_emblem` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `person_id_face` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `person_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `main_category_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`merchant_id`),
  KEY `FKmnyxq3gh6usvb6uq6k8lofnty` (`main_category_id`),
  KEY `FKiw63qwvgpdh8btgnn67miiuv0` (`user_id`),
  CONSTRAINT `FKiw63qwvgpdh8btgnn67miiuv0` FOREIGN KEY (`user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKmnyxq3gh6usvb6uq6k8lofnty` FOREIGN KEY (`main_category_id`) REFERENCES `zb_category` (`cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_merchant
-- ----------------------------
BEGIN;
INSERT INTO `zb_merchant` VALUES (2, NULL, NULL, b'0', '2020-06-17 00:18:09', 1, 0.00, 0.00, '/image/9776453b42ce4393bb40f9a375aad532.png', '/image/f5a227616af240fea782ab70a1045336.png', '13412312312', '阿斯顿发斯蒂芬', NULL, '北京市', '东城区', '沙发斯蒂芬是的', NULL, NULL, '110101', NULL, '北京市', '13412312312', '123141243', '真无奈感', '123123', 0.00, NULL, NULL, '/image/baeba3e3c9b74b598c8140aab7c99574.png', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'person', '422326198808271054', '/image/31b0f8d897d04a45976711371d44ff80.png', '/image/8dde967f156b47b3bde84d40884c774e.png', 'asdfasdfasdf', '$2a$10$TAFafcdP9zgQRsDk6J63Z.VSFvtnE0Z.yGQWknuKr8nGITQIaUnPu', '99', 24, 2);
INSERT INTO `zb_merchant` VALUES (3, '2020-06-17 00:59:46', NULL, b'0', '2020-06-17 00:59:46', 1, 0.00, 0.00, '/image/c746eb8b7487405d8d50a8a0dcd103ae.jpg', '/image/6a6210a3a3234d7c9f3e230ec5ac4b50.jpg', '18958045485', '只卖分', NULL, '呼和浩特市', '赛罕区', '退货地址返回给用户', NULL, NULL, '110101', NULL, '内蒙古自治区', '18958045485', '王剑南', '小剑的店铺', '25', 0.00, NULL, NULL, '/image/9df04b6361774c5b864dd135a46129a0.jpg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'person', '321324198901095211', '/image/fc2a2f7dde224a0e87fbf405e0d91360.jpg', '/image/ee6496a5899f49f0b57c5309d237e7cf.jpg', '王剑南', '$2a$10$8bNr3N/Tl3o7X8UwTYRfAeC4zpUIEePgpdcWk0RGwzdMjoGU.saku', '34', 24, 1);
COMMIT;

-- ----------------------------
-- Table structure for zb_merchant_shop_follow
-- ----------------------------
DROP TABLE IF EXISTS `zb_merchant_shop_follow`;
CREATE TABLE `zb_merchant_shop_follow` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_order
-- ----------------------------
DROP TABLE IF EXISTS `zb_order`;
CREATE TABLE `zb_order` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `final_amount` decimal(9,2) DEFAULT NULL,
  `pay_expire_time` datetime DEFAULT NULL,
  `pay_status` int(11) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `payment_bill_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `surplus_amount` decimal(9,2) DEFAULT NULL,
  `balance` decimal(9,2) DEFAULT NULL,
  `freight_amount` decimal(9,2) DEFAULT NULL,
  `goods_amount` decimal(9,2) DEFAULT NULL,
  `goods_num` int(11) DEFAULT NULL,
  `identify_fee` decimal(19,2) DEFAULT NULL,
  `is_need_identify` bit(1) DEFAULT NULL,
  `pmt_amount` decimal(9,2) DEFAULT NULL,
  `city_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `national_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver_mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9gqrm7wp6bpf207q3ipf4hfj2` (`rel_user_id`),
  CONSTRAINT `FK9gqrm7wp6bpf207q3ipf4hfj2` FOREIGN KEY (`rel_user_id`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_order_item
-- ----------------------------
DROP TABLE IF EXISTS `zb_order_item`;
CREATE TABLE `zb_order_item` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `after_sale_status` int(11) DEFAULT NULL,
  `deliver_status` int(11) DEFAULT NULL,
  `deliver_time` datetime DEFAULT NULL,
  `father_rebate` decimal(19,2) DEFAULT NULL,
  `cate_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable7days_returned_purchase` bit(1) DEFAULT NULL,
  `enable_nationwide_posting_free` bit(1) DEFAULT NULL,
  `goods_bn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `goods_id` bigint(20) DEFAULT NULL,
  `goods_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  `rebate_rate_one` decimal(6,3) DEFAULT NULL,
  `rebate_rate_two` decimal(6,3) DEFAULT NULL,
  `room_id` bigint(20) DEFAULT NULL,
  `service_rate` decimal(6,3) DEFAULT NULL,
  `thumbnail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `grand_rebate` decimal(19,2) DEFAULT NULL,
  `identify_fee` decimal(9,2) DEFAULT NULL,
  `identify_org_id` int(11) DEFAULT NULL,
  `identify_status` int(11) DEFAULT NULL,
  `num` int(11) NOT NULL,
  `payment` decimal(19,2) DEFAULT NULL,
  `pmt_amount` decimal(9,2) DEFAULT NULL,
  `receive_time` datetime DEFAULT NULL,
  `sub_order_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKoqh4akcos9wqxe5ae73vr8xgm` (`sub_order_id`),
  CONSTRAINT `FKoqh4akcos9wqxe5ae73vr8xgm` FOREIGN KEY (`sub_order_id`) REFERENCES `zb_sub_order` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_payment_bill
-- ----------------------------
DROP TABLE IF EXISTS `zb_payment_bill`;
CREATE TABLE `zb_payment_bill` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `amount` decimal(9,2) DEFAULT NULL,
  `deal_type` int(11) DEFAULT NULL,
  `pay_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `open_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_status` int(11) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `result_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `third_trading_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payer` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKkkc8ty88hnvarsdhslme28sw` (`payer`),
  CONSTRAINT `FKkkc8ty88hnvarsdhslme28sw` FOREIGN KEY (`payer`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_product
-- ----------------------------
DROP TABLE IF EXISTS `zb_product`;
CREATE TABLE `zb_product` (
  `product_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `commission_rate` decimal(6,3) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `detail_content` longtext COLLATE utf8mb4_unicode_ci,
  `exclusive_user_id` bigint(20) DEFAULT NULL,
  `freeze` int(11) DEFAULT NULL,
  `limited_num` int(11) DEFAULT NULL,
  `location` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `main_pic` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mkt_price` decimal(9,3) DEFAULT NULL,
  `price` decimal(9,3) DEFAULT NULL,
  `product_name` varchar(400) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_tags` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_type` int(11) DEFAULT NULL,
  `prop_material` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prop_size` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rebate_rate_one` decimal(6,3) DEFAULT NULL,
  `rebate_rate_two` decimal(6,3) DEFAULT NULL,
  `room_id` bigint(20) DEFAULT NULL,
  `service_tags` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sort_no` int(11) DEFAULT NULL,
  `status_code` int(11) DEFAULT NULL,
  `store` int(11) DEFAULT NULL,
  `sub_title` varchar(400) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `video` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `weight` decimal(9,3) DEFAULT NULL,
  `weight_unit` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cat_id` bigint(20) DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`product_id`),
  KEY `FKe0o06kxfo6b7g00vjxopbprjk` (`cat_id`),
  KEY `FKpv0tm3mo5qmsucg8xmlm5bcb9` (`merchant_id`),
  CONSTRAINT `FKpv0tm3mo5qmsucg8xmlm5bcb9` FOREIGN KEY (`merchant_id`) REFERENCES `zb_merchant` (`merchant_id`),
  CONSTRAINT `FKe0o06kxfo6b7g00vjxopbprjk` FOREIGN KEY (`cat_id`) REFERENCES `zb_category` (`cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_product
-- ----------------------------
BEGIN;
INSERT INTO `zb_product` VALUES (1, '2020-06-17 00:49:47', NULL, b'0', '2020-06-17 00:49:47', 0.030, 0, '是打发斯蒂芬', NULL, 0, 0, '杭州', '/image/e54f6a693f714308a4b89254a55ee95f.jpeg', 1.000, 0.010, '打发大水', NULL, 0, 'CAA', '10*10*10', NULL, NULL, NULL, ',,0,', 50, NULL, 100, NULL, '[\"/image/a9b61db8736446c88e6ab80e3741faa0.mp4\"]', 1.000, 'kg', 62, 2);
COMMIT;

-- ----------------------------
-- Table structure for zb_product_img
-- ----------------------------
DROP TABLE IF EXISTS `zb_product_img`;
CREATE TABLE `zb_product_img` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `big` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  `product_id` bigint(20) DEFAULT NULL,
  `small` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sort_no` int(11) DEFAULT NULL,
  `thumbnail` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_product_img
-- ----------------------------
BEGIN;
INSERT INTO `zb_product_img` VALUES (1, '/image/e54f6a693f714308a4b89254a55ee95f.jpeg', 2, 1, '/image/e54f6a693f714308a4b89254a55ee95f.jpeg', NULL, '/image/e54f6a693f714308a4b89254a55ee95f.jpeg');
COMMIT;

-- ----------------------------
-- Table structure for zb_refund_bill
-- ----------------------------
DROP TABLE IF EXISTS `zb_refund_bill`;
CREATE TABLE `zb_refund_bill` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `arrive_time` datetime DEFAULT NULL,
  `after_sale_bill` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(9,2) DEFAULT NULL,
  `credit_info` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `payment_bill_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refund_time` datetime DEFAULT NULL,
  `refund_type` int(11) DEFAULT NULL,
  `result_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_success` bit(1) DEFAULT NULL,
  `third_refund_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK3731ri2qrwxkgjkcckmqkvnhi` (`rel_user_id`),
  CONSTRAINT `FK3731ri2qrwxkgjkcckmqkvnhi` FOREIGN KEY (`rel_user_id`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_sub_order
-- ----------------------------
DROP TABLE IF EXISTS `zb_sub_order`;
CREATE TABLE `zb_sub_order` (
  `id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `amount_done` bit(1) NOT NULL,
  `final_amount` decimal(9,2) DEFAULT NULL,
  `freight_amount` decimal(9,2) DEFAULT NULL,
  `goods_amount` decimal(9,2) DEFAULT NULL,
  `goods_num` int(11) DEFAULT NULL,
  `identify_fee` decimal(19,2) DEFAULT NULL,
  `last_received_time` datetime DEFAULT NULL,
  `live_session_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order_type` int(11) DEFAULT NULL,
  `pmt_amount` decimal(9,2) DEFAULT NULL,
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `settlement_time` datetime DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  `rel_merchant_id` bigint(20) DEFAULT NULL,
  `rel_order_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK7bbecco6ijwsgyy95us0u2pmq` (`rel_merchant_id`),
  KEY `FKsmasnj00wx3gsewmhl8yrwnt8` (`rel_order_id`),
  CONSTRAINT `FKsmasnj00wx3gsewmhl8yrwnt8` FOREIGN KEY (`rel_order_id`) REFERENCES `zb_order` (`id`),
  CONSTRAINT `FK7bbecco6ijwsgyy95us0u2pmq` FOREIGN KEY (`rel_merchant_id`) REFERENCES `zb_merchant` (`merchant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_sub_order_log
-- ----------------------------
DROP TABLE IF EXISTS `zb_sub_order_log`;
CREATE TABLE `zb_sub_order_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `log_desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `operator_id` bigint(20) DEFAULT NULL,
  `operator_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `operation` int(11) DEFAULT NULL,
  `sub_order_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_user
-- ----------------------------
DROP TABLE IF EXISTS `zb_user`;
CREATE TABLE `zb_user` (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `advanced_buyer_team_size` int(11) DEFAULT NULL,
  `avatar_url` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `balance` decimal(19,2) DEFAULT NULL,
  `balance_in_future` decimal(19,2) DEFAULT NULL,
  `enabled` bit(1) DEFAULT NULL,
  `history_total_amount` decimal(19,2) DEFAULT NULL,
  `last_visit_time` datetime DEFAULT NULL,
  `login_token` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `merchant_id` bigint(20) DEFAULT NULL,
  `merchant_pay` bit(1) DEFAULT NULL,
  `merchant_status_team_size` int(11) DEFAULT NULL,
  `mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nick_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `normal_status_team_size` int(11) DEFAULT NULL,
  `parent_id` bigint(20) DEFAULT NULL,
  `real_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tree_path` text COLLATE utf8mb4_unicode_ci,
  `user_level` int(11) DEFAULT NULL,
  `user_type` int(11) DEFAULT NULL,
  `valid_pay_order_sum` decimal(19,2) DEFAULT NULL,
  `wechant_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `FK52av83yhf68hwpxlco6jypf9g` (`wechant_id`),
  CONSTRAINT `FK52av83yhf68hwpxlco6jypf9g` FOREIGN KEY (`wechant_id`) REFERENCES `zb_user_wechant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_user
-- ----------------------------
BEGIN;
INSERT INTO `zb_user` VALUES (1, '2020-06-16 23:47:18', NULL, b'0', '2020-06-17 01:54:24', NULL, 'https://wx.qlogo.cn/mmopen/vi_32/icqKB1tBbYGJ4pTDzmXCztpeWqRuATMwJ5LnSf5Ll9mHMA9ial7ULa3EhtoxZAVzxicVUia4Ln3Cicl8eR1b4f7QLqA/132', 0.00, 0.00, b'1', NULL, '2020-06-16 23:47:18', '806670465345347017442f446de95982', 3, b'1', NULL, '18958045485', '小剑', NULL, 0, NULL, '|1|', 0, 0, NULL, 1);
INSERT INTO `zb_user` VALUES (2, '2020-06-17 00:06:50', NULL, b'0', '2020-06-17 00:06:50', NULL, 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJATP79nEJwhZIkSfrpZ0SbpQL77DLd8GibOgXH4zk4iaK6urN96eN7ALmicXh0UNkXaVGrdLgtzrSOA/132', 0.00, 0.00, b'1', NULL, '2020-06-17 00:06:50', 'aed5a85296412ddf40c4a787dedcd979', 2, b'1', NULL, '17606540115', '郭😃', NULL, 0, NULL, '|2|', 0, 0, NULL, 2);
COMMIT;

-- ----------------------------
-- Table structure for zb_user_address
-- ----------------------------
DROP TABLE IF EXISTS `zb_user_address`;
CREATE TABLE `zb_user_address` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `city_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `district_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `national_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver_mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `receiver` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rel_user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_user_bank_info
-- ----------------------------
DROP TABLE IF EXISTS `zb_user_bank_info`;
CREATE TABLE `zb_user_bank_info` (
  `info_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `bank_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `default_flag` bit(1) DEFAULT NULL,
  `real_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`info_id`),
  KEY `FKqkr59nsj44jcob286fdvy8cvs` (`bank_id`),
  KEY `FKju8j0a33j3f8d5ewfxy1jp831` (`user_id`),
  CONSTRAINT `FKju8j0a33j3f8d5ewfxy1jp831` FOREIGN KEY (`user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKqkr59nsj44jcob286fdvy8cvs` FOREIGN KEY (`bank_id`) REFERENCES `zb_bank` (`bank_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_user_change_log
-- ----------------------------
DROP TABLE IF EXISTS `zb_user_change_log`;
CREATE TABLE `zb_user_change_log` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT,
  `attach` text COLLATE utf8mb4_unicode_ci,
  `create_time` datetime DEFAULT NULL,
  `log_text` varchar(400) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `log_type` int(11) DEFAULT NULL,
  `op_id` int(11) DEFAULT NULL,
  `op_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`log_id`),
  KEY `FK7wg0ber3unqyb4brtesocjt34` (`user_id`),
  CONSTRAINT `FK7wg0ber3unqyb4brtesocjt34` FOREIGN KEY (`user_id`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_user_relax
-- ----------------------------
DROP TABLE IF EXISTS `zb_user_relax`;
CREATE TABLE `zb_user_relax` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `child_id` bigint(20) DEFAULT NULL,
  `depth` int(11) DEFAULT NULL,
  `parent_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKcyi3kr09jyh4wp0meytn3tgt6` (`parent_id`),
  CONSTRAINT `FKcyi3kr09jyh4wp0meytn3tgt6` FOREIGN KEY (`parent_id`) REFERENCES `zb_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Table structure for zb_user_wechant
-- ----------------------------
DROP TABLE IF EXISTS `zb_user_wechant`;
CREATE TABLE `zb_user_wechant` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `app_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `avatar_url` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mini_session_key` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nick_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `open_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone_number` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pure_phone_number` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sex` int(11) DEFAULT NULL,
  `union_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of zb_user_wechant
-- ----------------------------
BEGIN;
INSERT INTO `zb_user_wechant` VALUES (1, 'wxc2764391ade782f2', 'https://wx.qlogo.cn/mmopen/vi_32/icqKB1tBbYGJ4pTDzmXCztpeWqRuATMwJ5LnSf5Ll9mHMA9ial7ULa3EhtoxZAVzxicVUia4Ln3Cicl8eR1b4f7QLqA/132', '', 'Iceland', '1knAuJBQuouQhkHsuSYX+g==', '小剑', 'oy1Wn5ITJgee3PnUNCtfAHnqA9jc', '18958045485', '', '18958045485', 1, NULL, 1);
INSERT INTO `zb_user_wechant` VALUES (2, 'wxc2764391ade782f2', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJATP79nEJwhZIkSfrpZ0SbpQL77DLd8GibOgXH4zk4iaK6urN96eN7ALmicXh0UNkXaVGrdLgtzrSOA/132', 'Hangzhou', 'China', 'qYO3OYMomPqEH+dfQl8gWg==', '郭😃', 'oy1Wn5Ab-sxRRr9G5v54lxINjwZE', '17606540115', 'Zhejiang', '17606540115', 1, NULL, 2);
COMMIT;

-- ----------------------------
-- Table structure for zb_withdraw_apply
-- ----------------------------
DROP TABLE IF EXISTS `zb_withdraw_apply`;
CREATE TABLE `zb_withdraw_apply` (
  `apply_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_deleted` bit(1) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `apply_fee` decimal(19,2) DEFAULT NULL,
  `apply_money` decimal(19,2) DEFAULT NULL,
  `refuse_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `withdraw_status` int(11) DEFAULT NULL,
  `withdraw_type` int(11) DEFAULT NULL,
  `bank_info_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`apply_id`),
  KEY `FKfx2kcqi8pv1ctq0gxtuhnimxa` (`bank_info_id`),
  KEY `FKhu7p8iyjjux9g6lkvj5gft853` (`user_id`),
  CONSTRAINT `FKhu7p8iyjjux9g6lkvj5gft853` FOREIGN KEY (`user_id`) REFERENCES `zb_user` (`user_id`),
  CONSTRAINT `FKfx2kcqi8pv1ctq0gxtuhnimxa` FOREIGN KEY (`bank_info_id`) REFERENCES `zb_user_bank_info` (`info_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

SET FOREIGN_KEY_CHECKS = 1;
